home *** CD-ROM | disk | FTP | other *** search
- function Request_QueryString(FieldName)
- {
- var QueryString = '';
- var FieldValue = '';
- var Start = 0;
- var End = 0;
- // Grab the querystring
- QueryString = unescape(window.location.search);
-
- // alert(QueryString);
- // Convert field name and querystring to lowercase so that
- // function is not case sensitive.
- FieldName = FieldName.toLowerCase();
- QueryString = QueryString.toLowerCase();
- // Look for field as first item ...
- Start = QueryString.indexOf(FieldName + '=');
- // alert("Start "+Start);
- //// alert("Index value="+Start);
- // If field is not the first ...
- if(Start!=1) {
- // Search appended fields
- Start = QueryString.indexOf('&' + FieldName + '=');
- // alert("here"+Start);
- // If field wasn't found at all, return empty string.
- if(Start==-1)
- {
- return(FieldValue);
- }
- // Setup start position after equal sign
- Start += FieldName.length + 2;
- }
- else
- {
- // Setup start position after equal sign
- Start = FieldName.length + 2;
- //// alert("coming here");
- }
- // Search for beginning of next field
- End = QueryString.indexOf('&', Start + 1);
- // alert("End value= "+End);
- // if another field was not defined, set end to length of querystring
- if(End==-1){
- End=QueryString.length;
- }
- // alert("End value1= "+End +"Strat value1= "+Start);
- // Parse the field value
- //FieldValue = unescape(window.location.search.substring(Start, End));
- // unescape special characters within the value (such as %20 = space character)
- FieldValue = QueryString.substring(Start,End);
- FieldValue = unescape(FieldValue);
- // Return the results
- return(FieldValue);
- }
- /*
- ============================================================================
- ==== Create Request Object
- ============================================================================
- ==== */
- function request(){}
-
-